<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Tambah Data Admin</title>

        <link href="<?php echo base_url('assets/css/tambah.css') ?>" type="text/css" rel="stylesheet" />
        <link href="<?php echo base_url('assets/js/jquery-ui.css'); ?>" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-1.9.1.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-ui.js'); ?>"></script>
        <script type="text/javascript">
            $(function() {
                $("#tgl").datepicker({changeMonth: true, changeYear: true});
            });
        </script></head>

    <body>
        <form action="<?php echo base_url('admin/pengguna/simpan_ubah'); ?>" method="post">
            <input type="hidden" name="idpengguna" value="<?php echo $data_pengguna->idpengguna; ?>" /> 
            <table width="425" border="0" align="center">
                <tr>
                    <td colspan="5" class="trheader"><strong>Ubah Data Pengguna</strong></td>
                </tr>
                <tr>
                    <td colspan="6" class="jeda">&nbsp;</td>
                </tr>
                <tr>
                    <td>Nama</td>
                    <td colspan="5"><input type="text" name="nama" id="nama" class="textinput" value="<?php echo $data_pengguna->nama; ?>"/></td>
                </tr>
                <tr>
                    <td>Alamat</td>
                    <td colspan="5"><input type="text" name="alamat" id="alamat" class="textinput" value="<?php echo $data_pengguna->alamat; ?>"/></td>
                </tr>
                <tr>
                    <td>Nomor Telpon</td>
                    <td colspan="5"><input type="text" name="no_telp" id="no_telp" class="textinput" value="<?php echo $data_pengguna->no_telp; ?>"/></td>
                </tr>
                <tr>
                    <td width="158">Masukkan Username</td>
                    <td colspan="5"><input type="text" name="usernm" id="usernm" class="textinput" value="<?php echo $data_pengguna->username; ?>"/></td>
                </tr>
                <tr>
                    <td>Masukkan Password</td>
                    <td colspan="5"><input type="password" name="passwd" id="passwd" class="textinput" value="<?php echo $data_pengguna->password; ?>"/></td>
                </tr>
                <tr>
                    <td>Level</td>
                    <td colspan="5">
                        <select name="level" id="level" class="list">
                            <?php
                            $lvl = $_POST[idpengguna];
                            //form ubah level
                            if ($lvl > 0) {
                                ?>
                                <option value="<?php echo $data_pengguna->level; ?>"><?php echo $data_pengguna->level; ?></option>
                            <?php } ?>
                            <option value="admin">Admin</option>
                            <option value="kaur">Kaur</option>
                            <option value="kades">Kepala Desa</option>
                        </select></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td width="81">&nbsp;</td>
                    <td width="1">&nbsp;</td>
                    <td width="167">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3"><div align="right">
                            <input type="submit" name="ubah" id="ubah" value="Ubah" class="radiobutton-kiri"/>
                        </div></td>
                    <td><input type="reset" name="bersih" id="bersih" value="Bersihkan" class="radiobutton-kiri" /></td>
                </tr>
            </table>               
        </form>
    </body>
</html>